package com.example.matetest.slice.login;

import com.example.matetest.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Component;
import ohos.agp.components.Image;
import ohos.agp.components.Text;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

public class RegisterAbilitySlice extends AbilitySlice implements Component.ClickedListener {
    private static final String TAG = RegisterAbilitySlice.class.getSimpleName();
    private static final HiLogLabel logLabel = new HiLogLabel(HiLog.LOG_APP, 0x00001, TAG);
    private Image imageBack;
    private Text title;

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_register);

        title = (Text) findComponentById(ResourceTable.Id_tv_title);
        imageBack = (Image) findComponentById(ResourceTable.Id_iv_back);
        imageBack.setClickedListener(this);
        title.setText("注册");

    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }

    @Override
    public void onClick(Component component) {
        if (component == imageBack) {
            terminate();
        }
    }

}
